Hi!
//This while-loop jumps over the first chapter
//This for-loop iterates over alle objects and writes in specific .txt-file
The problem is, that the object handle will be reset. Can anyone help me?
tobi_mehrl - Mon Dec 15 03:30:43 EST 2014 |
Re: Set the object handle? You cannot do that in a "for ... in ... do" loop. But of cause you can check for a flag:
bLoop = false;
for gobj_SSF in gmod_SSF do
{
// Start looping after reaching gobj_tmp
if (gobj_SFF == gobj_tmp) bLoop = true;
if (!bLoop) continue;
...
For more complicated situations you might want to put the objects in a skip list first, maybe in multiple looping passes, and then iterate over the skip list. Regards, Mathias |
Re: Set the object handle? Thanks for your answer. Is there are a option to iterate only over one specific chapter? In my Module I have 3 chapter, from which chapter I only need chapter 2... |
Re: Set the object handle? Mathias Mamsch - Mon Dec 15 04:38:59 EST 2014 You cannot do that in a "for ... in ... do" loop. But of cause you can check for a flag:
bLoop = false;
for gobj_SSF in gmod_SSF do
{
// Start looping after reaching gobj_tmp
if (gobj_SFF == gobj_tmp) bLoop = true;
if (!bLoop) continue;
...
For more complicated situations you might want to put the objects in a skip list first, maybe in multiple looping passes, and then iterate over the skip list. Regards, Mathias .. and stop when you get to chapter 3. At top:
Or, if you KNOW it is chapter "2", do this instead:
-Louie |